<%-- 
  - Author: Neha Chauhan
  - Date: 25-Apr-2011
  - Copyright Notice: TRAKHEES
  - Description: form.jsp
 --%>

<%@ include file="/WEB-INF/view/include.jsp"%>
<%@ page import="ae.pcfc.etks.online.web.*"%>
<script type="text/javascript">

		
		$(function() {			
			$( "#accordion" ).accordion();				
	});
		
		$(function() {			
			$( "#accordion1" ).accordion();				
	});
		
		$(function() {			
			$( "#accordion2" ).accordion();				
	});
		
		$(function() {			
			$( "#accordion3" ).accordion();				
	});	
		
		
</script>
<div id="container" dir='<spring:message code="page.dir"/>'
		align='<spring:message code="page.align"/>'>

<div id="company">
	<form:form name="CompanyDetails" id="CompanyDetails" method="POST"
		modelAttribute="<%=ConstantsAdmin.COMPANY_ADMIN_UPDATEROLE_MODEL_KEY %>">
		<spring:hasBindErrors
			name="<%=ConstantsAdmin.COMPANY_ADMIN_UPDATEROLE_MODEL_KEY %>">
			<script type="text/javascript">
				$(document)
						.ready(
								function() {
									jAlert(
											'error',
											'<li><form:errors path="*" delimiter="<li>"/>',
											'<spring:message code="label.errormessage" />');
								});
			</script>
		</spring:hasBindErrors>
	 
	 	<div id=accordion>
	 	<div style="clear:both"></div>
		<fieldset><legend><spring:message code="label.company.license" /></legend></fieldset>
		<div style="clear:both"></div><br/>
		   <div class="t_fin-black-txt">
		       <div class="fm-req"><spring:message code="label.company.role" />
		       <c:out value="${nonClientCompanyRegistrationAdminReview.strClientRole}" />
		       </div>
		       <div style="clear:both"></div>
			 	<div class="fm-req"><spring:message code="label.company.nameeng" />
			 	<c:out value="${nonClientCompanyRegistrationAdminReview.strCompNameEng}" />
			 	</div>
				<div style="clear:both"></div>			 	
		        <div class="fm-req"><spring:message code="label.company.namearab" />
		        <c:out value="${nonClientCompanyRegistrationAdminReview.strCompNameArab}" />
		        </div>
		        <div style="clear:both"></div>
		        <div class="fm-req"><spring:message code="label.company.lia" />
		        <c:out value="${nonClientCompanyRegistrationAdminReview.strLicenseIssuingAuth}" />
		        </div>
		        <div style="clear:both"></div>
		        <div class="fm-req"><spring:message code="label.company.lno" />
		        	<c:out value="${nonClientCompanyRegistrationAdminReview.strLicenseNumber}" />
		        </div>
		        <div style="clear:both"></div>
		        <div class="fm-req"><spring:message code="label.company.lictype" />
		        <c:out value="${nonClientCompanyRegistrationAdminReview.strLicenseType}" />
		        </div>
		        <div style="clear:both"></div>
		       <div class="fm-req"><spring:message code="label.company.lid" />
		       <c:out value="${nonClientCompanyRegistrationAdminReview.strLicenseIssueDate}" />		       	
		       </div>
		       <div style="clear:both"></div>
		       <div class="fm-req"><spring:message code="label.company.led" />
		       	<c:out value="${nonClientCompanyRegistrationAdminReview.strLicenseExpiryDate}" />
		       </div>
		       <div style="clear:both"></div>
		</div>
			<div style="clear:both"></div>
			<fieldset><legend><spring:message code="label.contact.location" /></legend></fieldset>
			<div style="clear:both"></div><br/>
			<div class="t_fin-black-txt">
			<div class="fm-req"><spring:message
				code="label.company.poboxnumber" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strPObox}" /></div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.poboxlocation" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strPOBoxLoc}" /></div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.telnooffice" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strTelNo}" /></div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.faxnooffice" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strFaxNo}" /></div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.websiteurl" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strWebsiteURL}" />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.emailaddress" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strEmailAddress}" />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.addresseng" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strAddressEng}" />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.addressarab" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strAddressArb}" />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message
				code="label.company.countryeng" /> <c:out
				value="${nonClientCompanyRegistrationAdminReview.strCountryEng}" />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><spring:message code="label.company.cityeng" />
			<c:out value="${nonClientCompanyRegistrationAdminReview.strCityEng}" />
			</div>
			<div style="clear:both"></div>
			</div>
	</div>
		</form:form>	
		
	<form:form name="CompanyAdminInfo" id="CompanyAdminInfo" method="POST"
		modelAttribute="<%=ConstantsAdmin.ADMIN_UPDATEROLE_ADMINDETAILS_C_MODEL_KEY %>">


	<div id=accordion2>
		<div style="clear:both"></div>
		<fieldset><legend><spring:message code="label.admin.details" /></legend></fieldset>
		<div style="clear:both"></div><br/>
			<div class="t_fin-black-txt">
				<div class="fm-req">	
					  <spring:message code="label.username" />
					
					<c:out value="${adminUpdateRoleCompanyAdminDetails.strUserName}" />
				<br />
			</div>	
			<div style="clear:both"></div>			
			<div class="fm-req">	
					
					  <spring:message code="label.emailaddress" />
					
					<c:out value="${adminUpdateRoleCompanyAdminDetails.strEmailAddress}" />
				<br />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">	
					
					  <spring:message code="label.mobilenumber" />
					
					<c:out value="${adminUpdateRoleCompanyAdminDetails.strMobileNumber}" />
				<br />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">	
					
					  <spring:message code="label.company.notification" />
					
					
					<c:if test="${adminUpdateRoleCompanyAdminDetails.strMobileNotification == 'Y'}">
						<spring:message code="label.smsnotification" />
					</c:if>
					<c:if test="${adminUpdateRoleCompanyAdminDetails.strEmailNotification == 'Y' }">
						<spring:message code="label.emailnotification" />
					</c:if>				
					
				<br />
			</div>
			<div style="clear:both"></div>			
	
			</div>				
	</div>
 	</form:form>
	
	 </div>
	 
	<div id="person">
	  
		<form:form name="PersonDetails" id="PersonDetails" method="POST"
			modelAttribute="<%=ConstantsAdmin.PERSON_ADMIN_UPDATEROLE_MODEL_KEY %>">
			<spring:hasBindErrors
			name="<%=ConstantsAdmin.PERSON_ADMIN_UPDATEROLE_MODEL_KEY %>">
			<script type="text/javascript">
				$(document)
						.ready(
								function() {
									jAlert(
											'error',
											'<li><form:errors path="*" delimiter="<li>"/>',
											'<spring:message code="label.errormessage" />');
								});
			</script>
		</spring:hasBindErrors>
		
		<div id=accordion1>
		<div style="clear:both"></div>
		<fieldset><legend><spring:message code="label.nonclient.person.register.personal.details" /></legend></fieldset>
		<div style="clear:both"></div><br/>
		 <div class="t_fin-black-txt">
			<div class="fm-req">
				<form:label path="strNameTitle">
					<spring:message code="label.nonclient.person.register.title" />
				</form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strNameTitle}"></c:out>
				<br />					
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><form:label path="strNonClientPersonNameENG">
				<spring:message code="label.nonclient.person.register.nameENG" />
				</form:label> <c:out value="${nonClientPersonRegisterAdminReviewUserData.strNonClientPersonNameENG}" />
				<br />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req"><form:label path="strNonClientPersonNameARB">
				<spring:message code="label.nonclient.person.register.nameARB" />
				</form:label> <c:out value="${nonClientPersonRegisterAdminReviewUserData.strNonClientPersonNameARB}" />
				<br />
			</div>
			<div style="clear:both"></div>
			<div class="fm-req" >
				<form:label path="iGender"><spring:message code="label.nonclient.person.register.gender" /></form:label>
				<c:if test="${nonClientPersonRegisterAdminReviewUserData.iGender == 0 }">
					Male
				</c:if>
				<c:if test="${nonClientPersonRegisterAdminReviewUserData.iGender == 1 }">
					Female
				</c:if>	
				<br />				
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strDateOfBirth"><spring:message code="label.nonclient.person.register.dateOfBirth" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strDateOfBirth}" />
				<br />				
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">
				<form:label path="strCity"><spring:message code="label.nonclient.person.register.city" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strCity}" />
				<br />				
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">
				<form:label path="strCountry"><spring:message code="label.nonclient.person.register.country" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strCountry}" />
				<br />				
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">
				<form:label path="strNationality"><spring:message code="label.nonclient.person.register.nationality" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strNationality}" />
				<br />							
			</div>
			<div style="clear:both"></div>
		 </div>
			<div style="clear:both"></div>
			<fieldset><legend><spring:message code="label.nonclient.person.register.contact.details" /></legend></fieldset>
			<div style="clear:both"></div><br/>
			<div class="t_fin-black-txt">
			<div class="fm-req">
				<form:label path="strAddressENG">
					<spring:message code="label.nonclient.person.register.addressENG" />
				</form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strAddressENG}" />
				<br/>								
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">
				<form:label path="strAddressARB">
					<spring:message code="label.nonclient.person.register.addressARB" />
				</form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strAddressARB}" />
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strPOBox"><spring:message code="label.nonclient.person.register.poBox" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strPOBox}" />
				<br/>				
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strPOBoxLocation"><spring:message code="label.nonclient.person.register.poBoxLocation" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strPOBoxLocation}" />
				<br/>				  
			</div>
			<div>
				<form:label path="strTelNoHome"><spring:message code="label.nonclient.person.register.telNoHome" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strTelNoHome}" />
				<br/>				
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strTelNoOffice"><spring:message code="label.nonclient.person.register.telNoOffice" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strTelNoOffice}" />
				<br/>				
			</div>
			<div style="clear:both"></div>
			<div class="fm-req">
				<form:label path="strMobNo1"><spring:message code="label.nonclient.person.register.mobNo1" /></form:label>
				<div><c:out value="${nonClientPersonRegisterAdminReviewUserData.strMobNo1}" /></div>
				<br/>	
			</div>
			<div>
				<form:label path="strMobNo2"><spring:message code="label.nonclient.person.register.mobNo2" /></form:label>
				<div><c:out value="${nonClientPersonRegisterAdminReviewUserData.strMobNo2}" /></div>
				<br/>								
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strFaxNo"><spring:message code="label.nonclient.person.register.faxNo" /></form:label>
				<div><c:out value="${nonClientPersonRegisterAdminReviewUserData.strFaxNo}" /></div>
				<br/>				
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strWebsiteURL"><spring:message code="label.nonclient.person.register.websiteURL" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strWebsiteURL}" />
				<br/>							
			</div>
			<div style="clear:both"></div>					
			<div>
				<form:label path="strEmailAddress"><spring:message code="label.nonclient.person.register.emailAddress" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strEmailAddress}" />								
			</div>
			<div style="clear:both"></div>
		</div>
		
		
		<div style="clear:both"></div>
		<fieldset><legend><spring:message code="label.nonclient.person.register.passport.details" /></legend></fieldset>
		<div style="clear:both"></div><br/>
		<div class="t_fin-black-txt">
			<div>
				<form:label path="strPassportNo">
					<spring:message code="label.nonclient.person.register.passportNo" />
				</form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strPassportNo}" />
				<br/>							
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strPassportPlaceOfIssue">
					<spring:message code="label.nonclient.person.register.passportPlaceOfIssue" />
				</form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strPassportPlaceOfIssue}" />							
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strPassportDateOfIssue"><spring:message code="label.nonclient.person.register.passprtDateOfIssue" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strPassportDateOfIssue}" />								
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strPassportExpiryDate"><spring:message code="label.nonclient.person.register.passportExpiryDate" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strPassportExpiryDate}" />						  
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strEmiratesID"><spring:message code="label.nonclient.person.register.emiratesID" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strEmiratesID}" />					
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strEbdara"><spring:message code="label.nonclient.person.register.ebdara" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strEbdara}" />				
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strVisaNo"><spring:message code="label.nonclient.person.register.visaNo" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strVisaNo}" />				
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strVisaType"><spring:message code="label.nonclient.person.register.visaType" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strVisaType}" />										
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strVisaExpiryDate"><spring:message code="label.nonclient.person.register.visaExpiryDate" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strVisaExpiryDate}" />										
				<br/>
			</div>
			<div style="clear:both"></div>
			<div>
				<form:label path="strRemarks"><spring:message code="label.nonclient.person.register.remarks" /></form:label>
				<c:out value="${nonClientPersonRegisterAdminReviewUserData.strRemarks}" />									
				<br/>			
			</div>
			<div style="clear:both"></div>
		</div>
</div>		
</form:form>

	
<form:form
	name="PersonAdminInfo" id="PersonAdminInfo" method="POST"
	modelAttribute="<%=ConstantsAdmin.ADMIN_UPDATEROLE_ADMINDETAILS_P_MODEL_KEY %>">
	
	<div id=accordion3>	
	<div style="clear:both"></div>
	<fieldset><legend><spring:message code="label.login.details" /></legend></fieldset>
	<div style="clear:both"></div><br/>
	<div class="t_fin-black-txt">
	<div class="fm-req">
	<form:label path="strUserName">
		<spring:message code="label.username" />
	</form:label>
	 <c:out
		value="${adminUpdateRolePersonAdminDetails.strUserName}" />
	<br />
	</div>
	<div style="clear:both"></div>
	<div class="fm-req">
	<form:label path="strEmailAddress">
		<spring:message code="label.emailaddress" />
	</form:label>
	<c:out
		value="${adminUpdateRolePersonAdminDetails.strEmailAddress}" />
	<br />
	</div>
	<div style="clear:both"></div>
	<div class="fm-req">	
			<form:label path="strMobileNo" >
		<spring:message code="label.mobilenumber" />
			</form:label>		
		<c:out value="${adminUpdateRolePersonAdminDetails.strMobileNo}" />
				<br />
	</div>
	<div style="clear:both"></div>
	
	<div class="fm-req">	
		<form:label path="strMobileNotification" >
					  <spring:message code="label.company.notification" />
			</form:label>		
					<c:if test="${adminUpdateRolePersonAdminDetails.strMobileNotification == 'Y'}">
						<spring:message code="label.smsnotification" />
					</c:if>
					<c:if test="${adminUpdateRolePersonAdminDetails.strEmailNotification == 'Y' }">
						<spring:message code="label.emailnotification" />
					</c:if>		
				<br />
			</div>

	</div>
	<div style="clear:both"></div>	
	
	</div>		
	
</form:form>
			
</div>
	
	<script type="text/javascript">
	var val1 = "<%=session.getAttribute("strDetails")%>"; 
	//alert(val1);
    var searchedString = '_C';
    var index = val1.indexOf(searchedString);
    if (index > -1) {
    	//alert("in if");
    	document.getElementById('company').style.display = "block";
    	document.getElementById('person').style.display = "none";
    }
    else {
    	//alert("in else");
    	document.getElementById('person').style.display = "block";
    	document.getElementById('company').style.display = "none";
    }
	
	</script> 
	
	<form:form name="UpdateRole" id="UpdateRole" method="POST"
			modelAttribute="<%=ConstantsAdmin.ADMIN_UPDATE_USER_ROLE_MODEL_KEY %>">
			<spring:hasBindErrors
			name="<%=ConstantsAdmin.ADMIN_UPDATE_USER_ROLE_MODEL_KEY %>">
			<script type="text/javascript">
				$(document)
						.ready(
								function() {
									jAlert(
											'error',
											'<li><form:errors path="*" delimiter="<li>"/>',
											'Error Validating Form');
								});
			</script>
		</spring:hasBindErrors>
		<div style="clear:both"></div>
		<fieldset>
			<legend><spring:message code="label.lock.unlock" /></legend>
		</fieldset>
		<div style="clear:both"></div><br/>
		<div class="t_form-left t_fin-black-txt">			
				<div class="fm-req">
					<form:label path="strActionType"><span class="t_star">*</span><spring:message code="label.nonclient.person.register.action.type" /></form:label>
					<c:choose>
					<c:when	test='${requestScope.requestContextAttribute.locale.language == "ar"}'>
						<form:select path="strActionType"
							items="${adminLockUnlockActionTypeList}"
							id="strActionType" itemLabel="labelAr" itemValue="labelAr" cssStyle="width:154px;" class="fm-opt"/>
					</c:when>
					<c:otherwise>
						<form:select path="strActionType"
							items="${adminLockUnlockActionTypeList}"
							id="strActionType" itemLabel="labelEn" itemValue="labelEn" cssStyle="width:154px;" class="fm-opt"/>
					</c:otherwise>
				</c:choose>							
				</div>
				
				<div class="fm-req">
					<form:label path="strComments"><span class="t_star">*</span><spring:message code="label.nonclient.person.register.action.comments" /></form:label>
					<form:textarea path="strComments" id="strComments"
							size="20" maxlength="100" style="width:190px;height:100px;" class="fm-opt"/>				
				</div>
		</div>
				<fieldset>
				<legend><spring:message code="label.menu.update.role" /></legend>
				</fieldset>
		     
	
	 <c:if test="${null != nonClientCompanyRegistrationClientRolesList and not empty nonClientCompanyRegistrationClientRolesList}">	
			
	<div>
	<display:table id="disTable" name="${nonClientCompanyRegistrationClientRolesList}" defaultsort="1"  requestURI="/admin/general/user/role/update/show.htm" sort="list"
    defaultorder="ascending" pagesize="10" class="displayTable">
    <display:column titleKey="label.admin.id"  property="id" sortable="true"  />
    <display:column property="labelEn" titleKey="label.admin.roles" sortable="true" />
    <display:column titleKey="label.admin.revoke" property="labelEn" headerClass="ui-state-default ui-th-column ui-th-ltr" format="<input type='submit' name='revoke' class='cancel' value='revoke' title='revoke' alt='revoke' />"/>
    <display:column titleKey="label.admin.grant" property="labelEn" headerClass="ui-state-default ui-th-column ui-th-ltr" format="<input type='submit' name='grant' class='cancel' value='grant' title='grant' alt='grant' />"/>
    </display:table>
	</div>
			
			
	</c:if>

  <br><br><br>
  
  
		<div id="fm-submit" class="fm-req">
				<input type="submit" name="save" value="<spring:message code="label.button.save" />" class="t_btns"/>
				<input type="reset" name="reset" value="<spring:message code="label.button.reset" />" class="t_btns"/>
	  </div>	
	</form:form>
	 
</div>
